<?php
/**
 * 单页模块
 * 
 + ----------------------------------------------------- 
 * Date 2013-3-8
 + -----------------------------------------------------
 */
class SimpleAction extends BaseAction {
	
	public function index(){
		$mid=isset($_GET['mid']) ? intval($_GET['mid']) : '';
		// 广告
		if($mid){
			$model=M('Menu');
			$menu=$model->find($mid);
			$pid=$menu['parent_id']?$menu['parent_id']:$mid;
			$this->assign('pid',$pid);
			if($pid==1){ //关于
				$pos_id=3;
				if($mid==5){
					$pos_id=7;
				}elseif($mid==12){
					$pos_id=3;
				}elseif($mid==6){
					$pos_id=8;
				}
				$this->assign('slide',$this->getAd($pos_id,1));
				$this->assign('is_slide',false);
			}elseif($pid==2){ //产品
				$this->assign('slide',$this->getAd(2,4));
				$this->assign('is_slide',true);
			}elseif($pid==3){ //活动
				$this->assign('slide',$this->getAd(6,4));
				$this->assign('is_slide',true);
			}elseif($pid==4){ //联系
				$this->assign('slide',$this->getAd(4,1));
				$this->assign('is_slide',false);
			}elseif($pid==11){ //探索
				$this->assign('slide',$this->getAd(5,1));
				$this->assign('is_slide',false);
			}
		}
		
		
		$model=M('Menu');
		$simple=$model->find($mid);
		$this->assign('simple',$simple);
		$this->display();
	}
	
}
?>
